<link href="./css/style.css" rel="stylesheet" type="text/css" />
<div class="main">
<div class="infolist">
	<p class="tt"><a>首页</a>><a href="infolist.php">公告管理</a>><span>公告列表</span></p>
	<div class="list">
		{if($msg==1)}
		<ul>
		{loop $inlist $key as $list}
			<li><p class='p1'><span>{$list[addtime]}</span><a href='/info.php?infoid={$list[Id]}'>{$list[title]}</a></p><p class='p2'><a href='info.php?infoid={$list[Id]}'>编辑</a> <a onclick='del({$list[Id]})'>删除</a></p></li>
		{/loop}
		</ul>
		{$page}
		{else}
		<p class='none'>未查询到相关信息</p>
		{/if}
	</div>
	<script src="./js/jquery.js"></script>
	<script>
		function del(id){
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudel.php?m=n&a=infodel",
					data:"id="+id,
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}
						else{
							alert(d[1]);
							window.location.href='infolist.php';
						}
					}
				});
			}
	</script>

</div>
</div>
<script>
	h1 = $(".main").height();
	h2 = $(".infolist").height();
	if(h2>h1){
		$(".main").css("height","auto");
	}
</script>